//
//  YYHomeViewController.m
//  youyuanhuaxia
//
//  Created by tusm on 16/5/27.
//  Copyright © 2016年 CaoJIGen. All rights reserved.
//

#import "YYHomeViewController.h"
#import "LGCarouselView.h"
@interface YYHomeViewController ()
@property(nonatomic,strong)LGCarouselView *carouseView;
@property(nonatomic,strong)NSArray *array;
@property(nonatomic,strong)NSArray *descArray;
@end

@implementation YYHomeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    
    [self setUpCarousel];
}


- (void)setUpCarousel {
    
        _array = @[[UIImage imageNamed:@"tpxy001"],[UIImage imageNamed:@"tpxy002"],[UIImage imageNamed:@"tpxy003"],[UIImage imageNamed:@"tpxy004"],[UIImage imageNamed:@"tpxy005"]];
//    _array = @[@"http://www.5068.com/u/faceimg/20140725173411.jpg", @"http://file27.mafengwo.net/M00/52/F2/wKgB6lO_PTyAKKPBACID2dURuk410.jpeg", @"http://file27.mafengwo.net/M00/B2/12/wKgB6lO0ahWAMhL8AAV1yBFJDJw20.jpeg"];
    _descArray = @[@"特殊儿童2011年年会",@"中国心理卫生协会残疾人心理卫生分会第八届学术交流会",@"刘斌题词",@"走进山东特教图书",@"综合课程教材",];
    
    _carouseView = [LGCarouselView carouselViewWithImageArray:_array describeArray:_descArray];
    
    _carouseView.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width , 180);
    
    //    _carouseView.imageArray = _array;
    _carouseView.time = 3;
    
    //描述的frame
    //    _carouseView.describeLabel.center = CGPointMake(375/2, 10);
    
    //    [_carouseView setPageImage:[UIImage imageNamed:@"current.png"] andCurrentImage:[UIImage imageNamed:@"other.png"] ];
    
//    _carouseView.pageControl.currentPageIndicatorTintColor = [UIColor redColor];
//    _carouseView.pageControl.pageIndicatorTintColor = [UIColor blackColor];
    
    
    [self.view addSubview:_carouseView];
}

@end
